package com.server.modules.api.service.impl;

import com.server.modules.api.dao.LoanMaterialtypeReAPIDao;
import com.server.modules.api.dao.MaterialUploadAPIDao;
import com.server.modules.api.service.MaterialUploadAPIService;
import com.server.modules.api.vo.LoanDto;
import com.server.modules.sys.entity.material.MaterialType;
import com.server.modules.sys.entity.material.MaterialUpload;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by Administrator on 2016/9/28.
 */
@Service
public class MaterialUploadAPIServiceImpl implements MaterialUploadAPIService {
    @Autowired
    private MaterialUploadAPIDao materialUploadAPIDao;

    @Autowired
    private LoanMaterialtypeReAPIDao loanMaterialtypeReAPIDao;
    @Override
    @Transactional(readOnly = false)
    public void delMaterialUpload(MaterialUpload materialUpload) {
        materialUploadAPIDao.delMaterialUpload(materialUpload);
    }

    @Override
    public List<MaterialType> getMaterialTypeName() {
        return loanMaterialtypeReAPIDao.getMaterialTypeName();
    }

    @Override
    public List<LoanDto> getMaterialTypeLoan(List<String> ids) {
        return loanMaterialtypeReAPIDao.getMaterialTypeLoan(ids);
    }


}
